﻿using System;
using System.Collections.Generic;
using System.Reflection;

namespace Rosetta
{
    public interface IContainer : IDisposable
    {
        #region Properties

        [NotNull]
        Type[] ArgumentTypes { get; }

        [NotNull]
        string[] Categories { get; }

        [NotNull]
        Type[] InputReturnTypes { get; }

        [NotNull]
        Type[] ReturnTypes { get; }

        #endregion

        #region Methods

        [CanBeNull]
        IAddIn GetAddIn([NotNull] string addInName);

        [NotNull]
        IEnumerable<IAccepts> GetAddInsByArgumentType([NotNull] Type argumentType);

        [NotNull]
        IEnumerable<IAddIn> GetAddInsByCategory([NotNull] string category);

        [NotNull]
        IEnumerable<IReturns> GetAddInsByReturnType([NotNull] Type returnType);

        [CanBeNull]
        IConverter GetConverter([NotNull] string addInName);

        [CanBeNull]
        IInputter GetInputter([NotNull] string addInName);

        [CanBeNull]
        IOutputter GetOutputter([NotNull] string addInName);

        void LoadAssembly([NotNull] Assembly assembly);

        #endregion
    }
}